Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(@angular-devkit/build-angular): support namedChunks option in application builder #25913

Merged
merged 1 commit into from
Oct 4, 2023

Conversation

cexbrayat
Copy link
Member

PR Checklist

Please check to confirm your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

The application builder does not support namedChunks yet.

What is the new behavior?

This adds the support of namedChunks for the new application builder.
It generates output like the following:

Initial Chunk Files         | Names         |  Raw Size | Estimated Transfer Size
chunk-ACXUMF56.js           | -             |  94.14 kB |                28.25 kB
main-3WP5KDHR.js            | main          |  71.95 kB |                18.31 kB
polyfills-4UVFGIFL.js       | polyfills     |  32.85 kB |                10.68 kB
chunk-2XJVAMHT.js           | -             | 449 bytes |               449 bytes
styles-5INURTSO.css         | styles        |   0 bytes |                 0 bytes

                            | Initial Total | 199.38 kB |                57.68 kB

Lazy Chunk Files            | Names         |  Raw Size | Estimated Transfer Size
about.component-2PJOS5PM.js | -             | 401 bytes |               401 bytes
home.component-25UHFOEY.js  | -             | 398 bytes |               398 bytes

This is really handy to get a glimpse at what a chunk is referring to and be able to analyze it (especially in applications with dozens of chunks).

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

…plication builder

This adds the support of `namedChunks` for the new `application` builder.
It generates output like the following:

```
Initial Chunk Files         | Names         |  Raw Size | Estimated Transfer Size
chunk-ACXUMF56.js           | -             |  94.14 kB |                28.25 kB
main-3WP5KDHR.js            | main          |  71.95 kB |                18.31 kB
polyfills-4UVFGIFL.js       | polyfills     |  32.85 kB |                10.68 kB
chunk-2XJVAMHT.js           | -             | 449 bytes |               449 bytes
styles-5INURTSO.css         | styles        |   0 bytes |                 0 bytes

                            | Initial Total | 199.38 kB |                57.68 kB

Lazy Chunk Files            | Names         |  Raw Size | Estimated Transfer Size
about.component-2PJOS5PM.js | -             | 401 bytes |               401 bytes
home.component-25UHFOEY.js  | -             | 398 bytes |               398 bytes
```

This is really handy to get a glimpse at what a chunk is referring to and be able to analyze it (especially in applications with dozens of chunks).
@angular-robot angular-robot bot added the detected: feature PR contains a feature commit label Sep 27, 2023
@clydin clydin added target: major This PR is targeted for the next major release action: merge The PR is ready for merge by the caretaker labels Oct 4, 2023
@clydin clydin merged commit 5898f72 into angular:main Oct 4, 2023
36 checks passed
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker detected: feature PR contains a feature commit target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants